import store from '@/store';

function eventChane (Ename,data){
    store.commit(Ename, data)
}

export async function eventMap(code,data){
    switch (Number(data.operation)) {
        case 4000:
            store.commit("INIT_SCREEN", data.data)
            break;
        case 4003:
            store.commit("UPDATA_SCREEN", data.data)
            break;
        case 3001:
            store.commit("SELECT_MODULE", data)
            console.log(data, '选中模块');
            break;
        case 3002:
            console.log(data, '取消选中模块');
            store.commit("CANCEL_MODULE", data)
            break;
        case 3000:
            console.log(data, '发送事件');
            store.commit("ISSUED_EVENT", data)
            break;
        default:
            break;
    }

}